﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Home : MonoBehaviour
{
    public GameObject AdsButton;
    void Start()
    {
        if (PlayerPrefs.GetInt("IsBuy") == 0)
        {
            AdsButton.SetActive(true);
        }
        else
            AdsButton.SetActive(false);
            // hidden banner (banner only show on Game Play scene)
        GoogleMobileAdsScript.Instance.HideBanner();
      //  GoogleMobileAdsScript.Instance.RequestBanner();
        MusicController.Music.BG_menu();
    }

    void Update()
    {
        // Exit game if click Escape key or back on mobile
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            ExitOK();
        }
    }

    /// <summary>
    /// Exit game
    /// </summary>
    public void ExitOK()
    {
        Application.Quit();
    }

}
